﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Public;

namespace DAL
{
    public class QuanHeDAL
    {
        public static List<QuanHePublic> LoadQuanHe()
        {
            var qh = Common.db.ExecuteStoreQuery<QuanHePublic>(@"select * from QuanHe where MaQH!=1");
            return qh.ToList();
        }
        public static QuanHePublic LoadQuanHeByMaQH(byte MaQH)
        {
            var qh = Common.db.ExecuteStoreQuery<QuanHePublic>(@"select * from QuanHe where MaQH=" + MaQH);
            return qh.FirstOrDefault();
        }
        public static List<QuanHePublic> LoadToanBoQuanHe()
        {
            var qh = Common.db.ExecuteStoreQuery<QuanHePublic>(@"select * from QuanHe");
            return qh.ToList();
        }
       
    }
}
